package com.letoken.platform.repo.app.req.mall;

import com.letoken.platform.pub.annotation.sms.AccountCheck;
import com.letoken.platform.pub.annotation.sms.SpecifyMatch;
import com.letoken.platform.pub.annotation.sms.VerityCodeCheck;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
@VerityCodeCheck(accountKey = "account",typeKey = "type",sendCount = 6)
@ApiModel(value = "短信验证码请求对象", description = "短信验证码请求对象")
public class SmsCodeDto implements Serializable {
    @NotBlank(message = "80407020")
    @AccountCheck()
    @ApiModelProperty(name = "account", value = "手机号", required = true, example = "18812345678")
    private String account;

//    private String graphicCode;
    @NotNull(message = "80407019")
    @SpecifyMatch(intValues = {1,2,3})
    @ApiModelProperty(name = "type", value = "业务类型 1=申请店铺 2=修改手机号验证旧号码 3=修改手机号新号码", required = true, example = "1")
    private Integer type;

    @ApiModelProperty(name = "areaCode", value = "国际号", required = true, example = "86")
    //@AccountCheck
    private Integer areaCode;

}
